FROM java:8-jre-alpine
VOLUME /tmp
ARG GIT_COMMIT=0
ENV GIT_COMMIT=${GIT_COMMIT}
LABEL GIT_COMMIT=${GIT_COMMIT}
LABEL description="https://www.qekang.com"
MAINTAINER https://blog.csdn.net/qierkang
ADD target/lancaster-public-1.0.0-SNAPSHOT.jar /lancaster-public.jar
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
ENV PORT 8877
ENV JAVA_OPTS="-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -Xms128m -Xmx384m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC"
CMD java -jar -Duser.timezone=GMT+08 ${JAVA_OPTS} /lancaster-public.jar -p $PORT